(in-package #:game)

(deftype player () '(member :white :black))

(deftype point () '(integer 1 24))

(defun opponent (player)
  (check-type player player)
  (if (eql player :white)
      :black
      :white))

(defun player= (player1 player2)
  (check-type player1 player)
  (check-type player2 player)
  (eql player1 player2))

(defun player-equal (player1 player2)
  (check-type player1 (or player null))
  (check-type player2 (or player null))
  (eql player1 player2))
